﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<WebDepartments>" %>

<%@ import Namespace="EF.Commons.Background.Entity" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    部门设置
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <h1>
        <%= Html.ActionLink("部门设置", "WebDepartmentsList", "System") %>-<%= Model.DepartmentID==int.MinValue?"添加":"修改" %>部门
    </h1>
    <% =Html.Partial("UCWebDepartments",Model) %>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ScriptContent" runat="server">
    <script type="text/javascript">
        $(document).ready(function () {
            $("form").validate({
                rules: {
                    DepartmentName: {
                        required: true,
                        minlength: 2,
                        maxlength: 50
                    },
                    About: {
                        required: true,
                        minlength: 2,
                        maxlength: 4000
                    },
                    SortNumber: {
                        required: true,
                        number: true
                    }
                },
                messages: {
                    DepartmentName: {
                        required: "请输入部门名称",
                        minlength: "部门名称至少为2字符，最多50字符",
                        maxlength: "部门名称至少为2字符，最多50字符"
                    },
                    About: {
                        required: "请输入部门说明",
                        minlength: "部门说明至少为2字符，最多4000字符",
                        maxlength: "部门说明至少为2字符，最多4000字符"
                    },
                    SortNumber: {
                        required: "请输入排序数字",
                        number: "排序数字必须为数字"
                    }
                }
            });
        });
        function Submit(input) {
            return true;
        }
    </script>
</asp:Content>
